import 'package:flutter/material.dart';

class TabBarItem extends StatelessWidget {
  final String defaultIconPath;
  final String selectedIconPath;
  final bool isSelected;
  const TabBarItem({
    super.key,
    required this.defaultIconPath,
    required this.selectedIconPath,
    required this.isSelected,
  });
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisSize: MainAxisSize.min,
      mainAxisAlignment: MainAxisAlignment.center, // 垂直方向居中
      crossAxisAlignment: CrossAxisAlignment.center, // 水平方向居中
      children: [
        Image.asset(
          isSelected ? selectedIconPath : defaultIconPath,
          width: 18,
          height: 18,
        ),
      ],
    );
  }
}